<?php
class OPPosition {
	/**
	* -------------------------------------------------------------------------
	*
	* 									Attributes
	*
	* -------------------------------------------------------------------------
	*/
	
	/**
	 * Latitude
	 *
	 * @var float
	 */
	protected $latitude;
	
	/**
	* Longitude
	*
	* @var float
	*/
	protected $longitude;
	
	/**
	 * -------------------------------------------------------------------------
	 *
	 * 									Static
	 *
	 * -------------------------------------------------------------------------
	 */
	
	/**
	 * Static constructor creating a new Position with latitude and longitude
	 *
	 * @param $latitude
	 * @param $longitude
	 * 
	 * @return OPPosition
	 */
	public static function newWithLatitudeLongitude($latitude, $longitude){
		$newPosition = new OPPosition();
		$newPosition->setLatitude($latitude)
					->setLongitude($longitude);
	
		return $newPosition;
	
	}
	
	/**
	 * Return the distance between 2 positions
	 * 
	 * @param $position1, $position2
	 * @return int
	 */
	public static function distanceBetween($position1, $position2) {
		return 10;
		
	}
	
	/**
	* -------------------------------------------------------------------------
	*
	* 									Dynamic
	*
	* -------------------------------------------------------------------------
	*/
	
	/**
	 * -------------------------------------------------------------------------
	 * 									Setters
	 * -------------------------------------------------------------------------
	 */
	
	/**
	 * Set the latitude
	 *
	 * @param $latitude
	 * @return OPPosition
	 */
	public function setLatitude($latitude) {
		$this->latitude = $latitude;
		
		return $this;
	
	}
	
	/**
	* Set the longitude
	*
	* @param $longitude
	* @return OPPosition
	*/
	public function setLongitude($longitude) {
		$this->longitude = $longitude;
	
		return $this;
	
	}
	
	/**
	 * -------------------------------------------------------------------------
	 * 									Getters
	 * -------------------------------------------------------------------------
	 */
	
	/**
	 * Return the latitude
	 *
	 * @return float
	 */
	public function latitude() {
		return $this->latitude;
	
	}
	
	/**
	* Return the longitude
	*
	* @return float
	*/
	public function longitude() {
		return $this->longitude;
	
	}
	
	
	
}